bitkeeper revision 1.740.2.1 (403b3e314yY3Ukw__2nvEZDN9Hks9A)
authorsmh22@tempest.cl.cam.ac.uk <smh22@tempest.cl.cam.ac.uk>
Tue, 24 Feb 2004 12:06:09 +0000 (12:06 +0000)
committersmh22@tempest.cl.cam.ac.uk <smh22@tempest.cl.cam.ac.uk>
Tue, 24 Feb 2004 12:06:09 +0000 (12:06 +0000)
fix schoolboy error in cciss probe :-)

xen/drivers/block/cciss.c

index 6e7096c890974500d22ee1e257fb441cb7696e4b..1cd341fa61c8afe4658411201a2f2a567795a0ab 100644 (file)
@@ -441,34 +441,41 @@ void cciss_probe_devices(xen_disk_info_t *xdi)
     drive_info_struct *drv; 
     xen_disk_t *xd = &xdi->disks[xdi->count];
 
-    ctlr = 0;  /* XXX SMH: only deal with 1 controller for now */
 
-    /* Loop through each real device */ 
-    for(i=0; i < NWD; i++) {
-       
-        drv = &(hba[ctlr]->drv[i]);
-       
-       if (!(drv->nr_blocks))
-            continue;
-       
-       if ( xdi->count == xdi->max )
-           BUG();
-       
+    for(ctlr = 0; ctlr < MAX_CTLR; ctlr++) { 
+
+       if(hba[ctlr] != NULL) { 
+
+           /* Loop through each real device */ 
+           for(i=0; i < NWD; i++) {
+               
+               drv = &(hba[ctlr]->drv[i]);
+               
+               if (!(drv->nr_blocks))
+                   continue;
+               
+               if ( xdi->count == xdi->max )
+                   BUG();
        
-       hba[ctlr]->hd[i << NWD_SHIFT].nr_sects = 
-           hba[ctlr]->sizes[i << NWD_SHIFT] = drv->nr_blocks;
        
-       /* We export 'raw' linux device numbers to domain 0. */
-       xd->device   = MKDEV(hba[ctlr]->major, i << 4); 
-       xd->info     = XD_TYPE_DISK;   /* XXX should check properly   */
-        xd->capacity = drv->nr_blocks; /* in terms of 512byte sectors */
-       xd->domain   = 0;
+               hba[ctlr]->hd[i << NWD_SHIFT].nr_sects = 
+                   hba[ctlr]->sizes[i << NWD_SHIFT] = drv->nr_blocks;
        
-       xdi->count++;
-        xd++;
+               /* We export 'raw' linux device numbers to domain 0. */
+               xd->device   = MKDEV(hba[ctlr]->major, i << 4); 
+               xd->info     = XD_TYPE_DISK;   /* XXX should check properly  */
+               xd->capacity = drv->nr_blocks; /* number of 512 byte sectors */
+               xd->domain   = 0;
+               
+               xdi->count++;
+               xd++;
        
+           }
+
+       }
     }
 
+    return; 
 }
 
 /*